import React, { useState } from 'react';
// @ts-ignore
import { Drawer, Button } from 'abc-ui';

export default () => {
  const [visible, setVisible] = useState(false);
  const [visible2, setVisible2] = useState(false);
  return (
    <div>
      <Button
        onClick={() => {
          setVisible(true);
        }}
      >
        点击
      </Button>
      <Button
        onClick={() => {
          setVisible2(true);
        }}
      >
        我有底部
      </Button>
      <Drawer
        title="抽屉"
        visible={visible}
        onCancel={() => {
          setVisible(false);
        }}
      >
        <p>基本...</p>
      </Drawer>
      <Drawer
        title="抽屉"
        visible={visible2}
        onCancel={() => {
          setVisible2(false);
        }}
        footer={
          <div
            style={{
              textAlign: 'right',
            }}
          >
            <Button
              onClick={() => {
                setVisible2(false);
              }}
              style={{ marginRight: 8 }}
            >
              取消
            </Button>
            <Button
              onClick={() => {
                setVisible2(false);
              }}
              type="primary"
            >
              确定
            </Button>
          </div>
        }
      >
        <p>我有底部foot</p>
      </Drawer>
    </div>
  );
};
